import { Routes, Route, Navigate } from "react-router-dom";
import Home from "../views/home"
import About from "../views/About"
import Add from "../views/AddUser"
import Testone from "../views/test/Testone"
const RouterView = () => {
    return (
        <Routes>
            <Route path="/home" element={<Home />} />
            <Route path="/about" element={<About />} />
            <Route path="/add" element={<Add />} >
                {/* <Route path=":id"  element={<Add/>}/> */}
                {/* <Route path=":id" element={<Navigate replace to="/add" />} /> */}
            </Route>
            <Route path="/add/:id" element={<Add />} />
            <Route path="/" element={<Navigate replace to="/home" />} />
            <Route path="/test" element={<Testone />} />
        </Routes>
    )
}

export default RouterView